package com.kish.web;

import com.kish.dao.BrandDao;
import com.kish.factory.StaticFactoryBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Demo02 {
    public static void main(String[] args) {
     /*   BrandDao brandDao = StaticFactoryBean.createBrandDao();
        brandDao.add();*/
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        BrandDao brandDao = (BrandDao) applicationContext.getBean("brandDao");
        brandDao.add();
    }
}
